package anbow.math;

import java.util.Scanner;

public class Prime {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		System.out.println(isPrime(n)==true?"Yes":"No");				
	}
	
	public static boolean isPrime(int n) {
		//特例处理 0 1
		if(n<2) return false;
		for(int i=2;i*i<=n;i++) if(n%i==0) return false;
		return true;		
	}
}
